package com.srx.elasticsearch.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * SwaggerConf 类
 * <p>Swagger配置类，用于配置Swagger的参数和路径</p>
 * @author 沈汝旭
 * @since 2025/10/19 16:50:03
 * @version 1.0
 */
@Configuration
public class SwaggerConfig
{
	@Bean
	public OpenAPI customOpenApi() {
		return new OpenAPI()
				.info(new Info()
						.title("搜索服务 API 文档")
						.version("v1.0")
						.description("这是搜索服务的接口文档")
						.contact(new Contact()
								.name("沈汝旭")
								.email("2017142276@qq.com")
								.url("https://gitee.com/shenruxu"))
						.license(new License()
								.name("Apache 2.0")
								.url("http://www.apache.org/licenses/LICENSE-2.0.html"))
				);
	}

}

